﻿@model IEnumerable<JT.Domain.TimeLine.TimeLine>

@{
    ViewData["Title"] = "大事记";
}

    <div class="card mt-2">

        <p><a asp-action="Create">添加</a></p>

        <table class="table">
            <thead>
                <tr>
                    <th>
                        @Html.DisplayNameFor(model => model.Months)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Content)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.YearNavigation)
                    </th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    <tr>
                        <td>
                            @Html.DisplayFor(modelItem => item.Months)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.Content)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.YearNavigation.YearId)
                        </td>
                        <td>
                            <a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
                            <a asp-action="Details" asp-route-id="@item.Id">Details</a> |
                            <a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
